<Project>

  <!--
    This file defines the list of projects to build and divides them into subsets. In ordinary
    situations, you should perform a full build by running 'build.cmd' or './build.sh'. This ensures
    the projects are sequenced correctly so the outputs and test results are what you would expect.

    Examples:

      ./build.sh host.native

        This builds only the .NET host.

      ./build.sh libs+host.native

        This builds the .NET host and also the manged libraries portion.
        A space ' ' or '+' are the delimiters between multiple subsets to build.

      ./build.sh -test host.tests

        This builds and executes the installer test projects. (The '-test' argument is an Arcade SDK argument
        that indicates tests should be run. Otherwise, they'll only be built.)
  -->

  <!-- Determine the primary runtime flavor. This is usually CoreCLR, except on
       platforms (like s390x) where only Mono is supported. The primary runtime
       flavor is used to decide when to build the hosts and installers. -->
  <PropertyGroup>
    <DefaultPrimaryRuntimeFlavor>CoreCLR</DefaultPrimaryRuntimeFlavor>
    <DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 'armv6'">Mono</DefaultPrimaryRuntimeFlavor>
    <DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 'ppc64le'">Mono</DefaultPrimaryRuntimeFlavor>
    <DefaultPrimaryRuntimeFlavor Condition="'$(TargetArchitecture)' == 's390x'">Mono</DefaultPrimaryRuntimeFlavor>
    <DefaultPrimaryRuntimeFlavor Condition="'$(TargetsLinuxBionic)' == 'true'">Mono</DefaultPrimaryRuntimeFlavor>
    <DefaultPrimaryRuntimeFlavor Condition="'$(TargetsMobile)' == 'true'">Mono</DefaultPrimaryRuntimeFlavor>
    <PrimaryRuntimeFlavor Condition="'$(PrimaryRuntimeFlavor)' == ''">$(DefaultPrimaryRuntimeFlavor)</PrimaryRuntimeFlavor>
  </PropertyGroup>

  <PropertyGroup>
    <DefaultSubsets>clr+mono+libs+tools+host+packs</DefaultSubsets>
    <DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+packs</DefaultSubsets>
    <DefaultSubsets Condition="'$(TargetsLinuxBionic)' == 'true'">mono+libs+host+packs</DefaultSubsets>
    <!-- In source build, mono is only supported as primary runtime flavor. On Windows mono is supported for x86/x64 only. -->
    <DefaultSubsets Condition="('$(DotNetBuildSourceOnly)' == 'true' and '$(PrimaryRuntimeFlavor)' != 'Mono') or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'x64')">clr+libs+tools+host+packs</DefaultSubsets>
  </PropertyGroup>

  <PropertyGroup>
    <!-- If we're building in the VMR, then we want to build all of the assets even in a PGO-instrumented build as downstream repos will not be able to pull assets from a matching non-PGO-instrumented build. -->
    <BuildOnlyPgoInstrumentedAssets Condition="'$(PgoInstrument)' == 'true' and '$(DotNetBuild)' != 'true'">true</BuildOnlyPgoInstrumentedAssets>
  </PropertyGroup>

  <!-- Init _subset here to allow RuntimeFlavor to be set as early as possible -->
  <PropertyGroup>
    <_subset Condition="'$(Subset)' != ''">+$(Subset.ToLowerInvariant())+</_subset>
    <_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+</_subset>
  </PropertyGroup>

  <PropertyGroup>
    <RuntimeFlavor Condition="'$(TargetsMobile)' == 'true' and !$(_subset.Contains('+clr.nativeaotlibs+'))">Mono</RuntimeFlavor>
    <RuntimeFlavor Condition="('$(TargetsMobile)' == 'true' or '$(TargetsLinuxBionic)' == 'true') and $(_subset.Contains('+clr.nativeaotlibs+'))">CoreCLR</RuntimeFlavor>
    <RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
    <RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor>
  </PropertyGroup>

  <PropertyGroup>
    <DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>
    <DefaultCoreClrSubsets Condition="'$(PackageRID)' == 'linux-armel'">clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
    <!-- Even on platforms that do not support the CoreCLR runtime, we still want to build ilasm/ildasm. -->
    <DefaultCoreClrSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>

    <DefaultNativeAotSubsets>clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime</DefaultNativeAotSubsets>

    <DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(TargetOS)' == 'browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(TargetOS)' == 'wasi'">$(DefaultMonoSubsets)mono.wasiruntime+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(MonoCrossAOTTargetOS)' != ''">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
    <DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(TargetsMobile)' == 'true' or '$(ForceBuildMobileManifests)' == 'true'">$(DefaultMonoSubsets)mono.manifests+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="$(_subset.Contains('+mono.wasmworkload+'))">$(DefaultMonoSubsets)mono.manifests+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'Mono'">$(DefaultMonoSubsets)mono.tools+</DefaultMonoSubsets>
    <DefaultMonoSubsets Condition="'$(TargetsMobile)' != 'true'">$(DefaultMonoSubsets)host.native+</DefaultMonoSubsets>

    <DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
                                        '$(BuildTargetFramework)' == '' or
                                        '$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets>
    <DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.sfx+libs.oob+libs.pretest</DefaultLibrariesSubsets>
    <!-- Respect the DotNetBuildTests product flag when building the product. -->
    <DefaultLibrariesSubsets Condition="'$(DotNetBuildTests)' == 'true'">$(DefaultLibrariesSubsets)+libs.tests</DefaultLibrariesSubsets>

    <DefaultToolsSubsets>tools.illink</DefaultToolsSubsets>

    <DefaultHostSubsets>host.native+host.tools+host.pkg</DefaultHostSubsets>
    <DefaultHostSubsets Condition="'$(DotNetBuildSourceOnly)' != 'true'">$(DefaultHostSubsets)+host.pretest+host.tests</DefaultHostSubsets>
    <DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)' or '$(TargetsMobile)' == 'true'"></DefaultHostSubsets>
    <DefaultHostSubsets Condition="'$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">host.native</DefaultHostSubsets>

    <DefaultPacksSubsets>packs.product</DefaultPacksSubsets>
    <DefaultPacksSubsets Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true' and '$(DotNetBuildSourceOnly)' != 'true'">$(DefaultPacksSubsets)+packs.tests</DefaultPacksSubsets>
    <DefaultPacksSubsets Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(DefaultPacksSubsets)+packs.installers</DefaultPacksSubsets>
    <DefaultPacksSubsets Condition="'$(RuntimeFlavor)' != 'Mono' and '$(ForceBuildMobileManifests)' == 'true'">$(DefaultPacksSubsets)+mono.manifests</DefaultPacksSubsets>
  </PropertyGroup>

  <PropertyGroup>
    <_subset>$(_subset.Replace('+clr.paltests+', '+clr.paltests+clr.paltestlist+'))</_subset>
    <_subset>$(_subset.Replace('+clr+', '+$(DefaultCoreClrSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+clr.aot+', '+$(DefaultNativeAotSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+mono+', '+$(DefaultMonoSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+libs+', '+$(DefaultLibrariesSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+tools+', '+$(DefaultToolsSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+host+', '+$(DefaultHostSubsets)+'))</_subset>
    <_subset>$(_subset.Replace('+packs+', '+$(DefaultPacksSubsets)+'))</_subset>

    <!-- Surround _subset in dashes to simplify checks below -->
    <_subset>+$(_subset.Trim('+'))+</_subset>

    <ClrRuntimeBuildSubsets></ClrRuntimeBuildSubsets>
    <ClrDefaultRuntimeBuildSubsets>ClrRuntimeSubset=true;ClrJitSubset=true;ClrILToolsSubset=true</ClrDefaultRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup>
    <!-- CLR NativeAot only builds in a subset of the matrix -->
    <_NativeAotSupportedOS Condition="'$(TargetOS)' == 'windows' or '$(TargetOS)' == 'linux' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'freebsd'">true</_NativeAotSupportedOS>
    <_NativeAotSupportedArch Condition="'$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64' or '$(TargetArchitecture)' == 'arm' or ('$(TargetOS)' == 'windows' and '$(TargetArchitecture)' == 'x86')">true</_NativeAotSupportedArch>
    <NativeAotSupported Condition="'$(_NativeAotSupportedOS)' == 'true' and $(_NativeAotSupportedArch) == 'true'">true</NativeAotSupported>

    <!-- If we're building clr.nativeaotlibs and not building the CLR runtime, compile libraries against NativeAOT CoreLib -->
    <UseNativeAotCoreLib Condition="'$(TestNativeAot)' == 'true' or ($(_subset.Contains('+clr.nativeaotlibs+')) and !$(_subset.Contains('+clr.native+')) and !$(_subset.Contains('+clr.runtime+')))">true</UseNativeAotCoreLib>
  </PropertyGroup>

  <ItemGroup>
    <!-- CoreClr -->
    <SubsetName Include="Clr" Description="The full CoreCLR runtime. Equivalent to: $(DefaultCoreClrSubsets)" />
    <SubsetName Include="Clr.NativePrereqs" Description="Managed tools that support building the native components of the runtime (such as DacTableGen)." />
    <SubsetName Include="Clr.ILTools" Description="The CoreCLR IL tools (ilasm/ildasm)." />
    <SubsetName Include="Clr.Runtime" Description="The CoreCLR .NET runtime. Includes clr.jit, clr.iltools, clr.hosts." />
    <SubsetName Include="Clr.Native" Description="All CoreCLR native non-test components, including the runtime, jits, and other native tools. Includes clr.hosts, clr.runtime, clr.jit, clr.alljits, clr.paltests, clr.iltools, clr.nativeaotruntime, clr.spmi." />
    <SubsetName Include="Clr.Aot" Description="Everything needed for Native AOT workloads, including clr.alljits, clr.tools, clr.nativeaotlibs, and clr.nativeaotruntime" />
    <SubsetName Include="Clr.NativeAotLibs" Description="The CoreCLR native AOT CoreLib and other low level class libraries." />
    <SubsetName Include="Clr.NativeAotRuntime" Description="The stripped-down CoreCLR native AOT runtime." />
    <SubsetName Include="Clr.CrossArchTools" Description="The cross-targeted CoreCLR tools." />
    <SubsetName Include="Clr.PalTests" OnDemand="true" Description="The CoreCLR PAL tests." />
    <SubsetName Include="Clr.PalTestList" OnDemand="true" Description="Generate the list of the CoreCLR PAL tests. When using the command line, use Clr.PalTests instead." />
    <SubsetName Include="Clr.Hosts" Description="The CoreCLR corerun test host." />
    <SubsetName Include="Clr.Jit" Description="The JIT for the CoreCLR .NET runtime." />
    <SubsetName Include="Clr.AllJits" Description="All of the cross-targeting JIT compilers for the CoreCLR .NET runtime." />
    <SubsetName Include="Clr.Spmi" Description="SuperPMI, a tool for CoreCLR JIT testing." />
    <SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." />
    <SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
    <SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." />
    <SubsetName Include="Clr.ToolsTests" OnDemand="true" Description="Unit tests for the clr.tools subset." />
    <SubsetName Include="Clr.Packages" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
    <SubsetName Include="LinuxDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
    <SubsetName Include="AlpineDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86" />
    <SubsetName Include="CrossDacPack" OnDemand="true"
            Description="Packaging of cross OS DAC. Requires all assets needed to be present at a folder specified by $(CrossDacArtifactsDir). See 'Microsoft.CrossOsDiag.Private.CoreCLR.proj' for details." />

    <!-- Mono -->
    <SubsetName Include="Mono" Description="The Mono runtime and CoreLib. Equivalent to: $(DefaultMonoSubsets)" />
    <SubsetName Include="Mono.Runtime" Description="The Mono .NET runtime." />
    <SubsetName Include="Mono.AotCross" Description="The cross-compiler runtime for Mono AOT." />
    <SubsetName Include="Mono.CoreLib" Description="The managed System.Private.CoreLib library for Mono." />
    <SubsetName Include="Mono.Manifests" Description="The NuGet packages with manifests defining the mobile and Blazor workloads." />
    <SubsetName Include="Mono.Packages" Description="The projects that produce NuGet packages for the Mono runtime." />
    <SubsetName Include="Mono.Tools" Description="Tooling that helps support Mono development and testing." />
    <SubsetName Include="Mono.WasmRuntime" Description="The Emscripten runtime." />
    <SubsetName Include="Mono.WasiRuntime" Description="The WASI runtime." />
    <SubsetName Include="Mono.WasmWorkload" Description="*Helper* subset for building some pre-requisites for wasm workload testing, useful on CI." />
    <SubsetName Include="Mono.MsCorDbi" Description="The implementation of ICorDebug interface." />
    <SubsetName Include="Mono.Workloads" OnDemand="true" Description="Builds the installers and the insertion metadata for Blazor workloads." />

    <!-- Tools -->
    <SubsetName Include="Tools" Description="Additional runtime tools projects. Equivalent to: $(DefaultToolsSubsets)" />
    <SubsetName Include="Tools.ILLink" Description="The projects that produce illink and analyzer tools for trimming." />
    <SubsetName Include="Tools.ILLinkTests" OnDemand="true" Description="Unit tests for the tools.illink subset." />

    <!-- Host -->
    <SubsetName Include="Host" Description="The .NET hosts, packages, hosting libraries, and tests. Equivalent to: $(DefaultHostSubsets)" />
    <SubsetName Include="Host.Native" Description="The .NET hosts." />
    <SubsetName Include="Host.Pkg" Description="The .NET host packages." />
    <SubsetName Include="Host.Tools" Description="The .NET hosting libraries." />
    <SubsetName Include="Host.PreTest" Description="Test assets which are necessary to run the .NET hosting tests." />
    <SubsetName Include="Host.Tests" Description="The .NET hosting tests." />

    <!-- Libs -->
    <SubsetName Include="Libs" Description="The libraries native part, refs and source assemblies, test infra and packages, but NOT the tests (use Libs.Tests to request those explicitly). Equivalent to: $(DefaultLibrariesSubsets)" />
    <SubsetName Include="Libs.Native" Description="The native libraries used in the shared framework." />
    <SubsetName Include="Libs.Sfx" Description="The managed shared framework libraries." />
    <SubsetName Include="Libs.Oob" Description="The managed out-of-band libraries." />
    <SubsetName Include="Libs.Ref" OnDemand="true" Description="The managed reference libraries." />
    <SubsetName Include="Libs.Src" OnDemand="true" Description="The managed implementation libraries." />
    <SubsetName Include="Libs.PreTest" Description="Test assets which are necessary to run tests." />
    <SubsetName Include="Libs.Tests" OnDemand="true" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />

    <!-- Packs -->
    <SubsetName Include="Packs" Description="Builds the shared framework packs, archives, bundles, installers, and the framework pack tests. Equivalent to: $(DefaultPacksSubsets)" />
    <SubsetName Include="Packs.Product" Description="Builds the shared framework packs, archives, bundles, and installers." />
    <SubsetName Include="Packs.Installers" Description="Builds the shared framework bundles and installers." />
    <SubsetName Include="Packs.Tests" Description="The framework pack tests." />

    <!-- Utility -->
    <SubsetName Include="publish" OnDemand="true" Description="Generate asset manifests and prepare to publish to BAR." />
    <SubsetName Include="RegenerateDownloadTable" OnDemand="true" Description="Regenerates the nightly build download table" />
    <SubsetName Include="RegenerateThirdPartyNotices" OnDemand="true" Description="Regenerates the THIRD-PARTY-NOTICES.TXT file based on other repos' TPN files." />
    <SubsetName Include="tasks" OnDemand="true" Description="Build the repo local task projects." />

  </ItemGroup>

  <!-- Default targets, parallelization and configurations. -->
  <ItemDefinitionGroup>
    <ProjectToBuild>
      <Test>false</Test>
      <Pack>false</Pack>
      <Publish>false</Publish>
      <BuildInParallel>false</BuildInParallel>
    </ProjectToBuild>
  </ItemDefinitionGroup>

  <!-- CoreClr sets -->
  <ItemGroup Condition="$(_subset.Contains('+clr.corelib+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)System.Private.CoreLib\System.Private.CoreLib.csproj" Category="clr" />
  </ItemGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.hosts+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrHostsSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.runtime+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrRuntimeSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.native+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrFullNativeBuild=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.jit+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrJitSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.paltests+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrPalTestsSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.alljits+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrAllJitsSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.iltools+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrILToolsSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.nativeaotruntime+')) and '$(NativeAotSupported)' == 'true'">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrNativeAotSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <PropertyGroup Condition="$(_subset.Contains('+clr.spmi+'))">
    <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrSpmiSubset=true</ClrRuntimeBuildSubsets>
  </PropertyGroup>

  <ItemGroup Condition="'$(ClrRuntimeBuildSubsets)' != '' or $(_subset.Contains('+clr.nativeprereqs+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)runtime-prereqs.proj" Category="clr" GlobalPropertiesToRemove="$(NativeBuildPartitionPropertiesToRemove)" />
  </ItemGroup>

  <ItemGroup Condition="'$(ClrRuntimeBuildSubsets)' != ''">
    <ProjectToBuild
      Include="$(CoreClrProjectRoot)runtime.proj"
      AdditionalProperties="%(AdditionalProperties);$(ClrRuntimeBuildSubsets)"
      Category="clr" />
  </ItemGroup>

  <!--
    Build the CoreCLR cross tools when we're doing a cross build and either we're building any CoreCLR native tools for platforms CoreCLR fully supports or when someone explicitly requests them.
    The cross tools are used as part of the build process with the downloaded build tools, so we need to build them for the host architecture and build them as unsanitized binaries.
    -->
  <ItemGroup Condition="(('$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')) or $(_subset.Contains('+clr.crossarchtools+'))) and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(EnableNativeSanitizers)' != '')">
    <ProjectToBuild
      Include="$(CoreClrProjectRoot)runtime.proj"
      AdditionalProperties="%(AdditionalProperties);
                            ClrCrossComponentsSubset=true;
                            HostArchitecture=$(BuildArchitecture);
                            HostCrossOS=$(HostOS);
                            PgoInstrument=false;
                            NoPgoOptimize=true;
                            CrossBuild=false;
                            CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1"
      UndefineProperties="EnableNativeSanitizers"
      Category="clr" />
  </ItemGroup>

  <!--
    Build the debugging components of CoreCLR for the same target architecture as an unsanitized build whenever we build a sanitized coreclr build.
    These components are loaded into a debugger process, which generally is not a sanitized executable.
  -->
  <ItemGroup Condition="'$(ClrRuntimeBuildSubsets)' != '' and '$(EnableNativeSanitizers)' != ''">
    <ProjectToBuild
      Include="$(CoreClrProjectRoot)runtime.proj"
      AdditionalProperties="%(AdditionalProperties);
                            ClrDebugSubset=true;
                            PgoInstrument=false;
                            NoPgoOptimize=true;
                            CrossBuild=$(CrossBuild);
                            BuildSubdirectory=unsanitized"
      UndefineProperties="EnableNativeSanitizers"
      Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.paltestlist+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)pal/tests/palsuite/producepaltestlist.proj" />
  </ItemGroup>

  <PropertyGroup>
    <CrossDacHostArch>x64</CrossDacHostArch>
    <CrossDacHostArch Condition="'$(TargetArchitecture)' == 'arm'">x86</CrossDacHostArch>
  </PropertyGroup>

  <ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows))  and ('$(BuildArchitecture)' == 'x64' or '$(BuildArchitecture)' == 'x86') and '$(TargetArchitecture)' != 'x86'">
    <ProjectToBuild
      Include="$(CoreClrProjectRoot)runtime.proj"
      AdditionalProperties="%(AdditionalProperties);
                            ClrCrossComponentsSubset=true;
                            HostArchitecture=$(CrossDacHostArch);
                            PgoInstrument=false;
                            NoPgoOptimize=true;
                            TargetOS=linux;
                            CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1" Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+alpinedac+')) and $([MSBuild]::IsOsPlatform(Windows)) and ('$(BuildArchitecture)' == 'x64' or '$(BuildArchitecture)' == 'x86') and '$(TargetArchitecture)' != 'x86'">
    <ProjectToBuild
      Include="$(CoreClrProjectRoot)runtime.proj"
      AdditionalProperties="%(AdditionalProperties);
                            ClrCrossComponentsSubset=true;
                            HostArchitecture=$(CrossDacHostArch);
                            PgoInstrument=false;
                            NoPgoOptimize=true;
                            TargetOS=alpine;
                            CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1" Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+crossdacpack+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot).nuget\Microsoft.CrossOsDiag.Private.CoreCLR\Microsoft.CrossOsDiag.Private.CoreCLR.proj" Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.tools+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\runincontext\runincontext.csproj;
                             $(CoreClrProjectRoot)tools\tieringtest\tieringtest.csproj;
                             $(CoreClrProjectRoot)tools\r2rdump\R2RDump.csproj;
                             $(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo.csproj;
                             $(CoreClrProjectRoot)tools\aot\ILCompiler\repro\repro.csproj;
                             $(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj;
                             $(CoreClrProjectRoot)tools\PdbChecker\PdbChecker.csproj;
                             $(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/>
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2.csproj" Category="clr" />
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Build.Tasks\ILCompiler.Build.Tasks.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
    <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />

    <ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and ('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_inbuild.csproj" Category="clr" />

    <ProjectToBuild Condition="'$(TargetOS)' == 'windows' or ('$(TargetOS)' == 'linux' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'arm64')) or '$(TargetOS)' == 'osx'" Include="$(CoreClrProjectRoot)tools\SuperFileCheck\SuperFileCheck.csproj" Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.toolstests+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.TypeSystem.Tests\ILCompiler.TypeSystem.Tests.csproj"
      Test="true" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/>
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Compiler.Tests\ILCompiler.Compiler.Tests.csproj"
      Test="true" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(NativeAotSupported)' == 'true'"/>
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler.Trimming.Tests\ILCompiler.Trimming.Tests.csproj"
      Test="true" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(NativeAotSupported)' == 'true'"/>
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+tools.illink+'))">
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\linker\Mono.Linker.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\ILLink.Tasks\ILLink.Tasks.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\analyzer\analyzer.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\linker\ref\Mono.Linker.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\tlens\tlens.csproj" Category="tools" />
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\src\ILLink.CodeFix\ILLink.CodeFixProvider.csproj" Category="tools" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+tools.illinktests+'))">
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\Mono.Linker.Tests\Mono.Linker.Tests.csproj"
      Test="true" Category="tools"/>
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj"
      Test="true" Category="tools"/>
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj"
      Test="true" Category="tools"/>
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\ILLink.Tasks.Tests\ILLink.Tasks.Tests.csproj"
      Test="true" Category="tools"/>
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\ILLink.RoslynAnalyzer.Tests\ILLink.RoslynAnalyzer.Tests.csproj"
      Test="true" Category="tools"/>
    <ProjectToBuild Include="$(ToolsProjectRoot)illink\test\ILLink.RoslynAnalyzer.Tests.Generator\ILLink.RoslynAnalyzer.Tests.Generator.csproj"
      Test="true" Category="tools"/>
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)crossgen-corelib.proj" Category="clr" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.packages+')) and '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
    <ProjectToBuild Include="$(CoreClrProjectRoot).nuget\coreclr-packages.proj" Pack="true" Category="clr" />
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo-pack.proj" Pack="true" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(RuntimeFlavor)' != 'Mono'"/>
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+clr.nativeaotlibs+')) and '$(NativeAotSupported)' == 'true'">
    <ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\**\src\*.csproj" Category="clr" />
  </ItemGroup>

  <!-- Mono sets -->
  <ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or $(_subset.Contains('+mono.aotcross+')) or '$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'android' or '$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi' or '$(TargetsLinuxBionic)' == 'true'">
    <ProjectToBuild Include="$(MonoProjectRoot)llvm\llvm-init.proj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.manifests+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)nuget\manifest-packages.proj" Category="mono" Pack="true" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.packages+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)nuget\mono-packages.proj" Category="mono" Pack="true" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.runtime+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)mono.proj" AdditionalProperties="%(AdditionalProperties);MonoMsCorDbi=$(_subset.Contains('+mono.mscordbi+'))" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.aotcross+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)monoaotcross.proj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.corelib+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)System.Private.CoreLib\System.Private.CoreLib.csproj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.tools+'))">
    <ProjectToBuild Include="$(CoreClrProjectRoot)tools\dotnet-pgo\dotnet-pgo.csproj;" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.workloads+'))">
    <ProjectToBuild Include="$(WorkloadsProjectRoot)\workloads.csproj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.wasmworkload+'))">
    <ProjectToBuild Include="$(MonoProjectRoot)\wasm\workloads.proj" Category="mono" />
  </ItemGroup>

  <!-- Host sets -->
  <ItemGroup Condition="$(_subset.Contains('+host.native+'))">
    <CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" SignPhase="Binaries" />
    <ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+host.tools+'))">
    <ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
    <ProjectToBuild Include="@(ManagedProjectToBuild)" BuildInParallel="true" Pack="true" Category="host" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+host.pkg+')) and '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
    <PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\host-packages.proj" SignPhase="MsiFiles" />
    <ProjectToBuild Include="@(PkgprojProjectToBuild)" Pack="true" Category="host" />
  </ItemGroup>

  <!-- Libraries sets -->
  <ItemGroup Condition="$(_subset.Contains('+libs.native+'))">
    <ProjectToBuild Include="$(SharedNativeRoot)libs\build-native.proj" Category="libs" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+libs.ref+')) or $(_subset.Contains('+libs.src+')) or $(_subset.Contains('+libs.sfx+'))">
    <ProjectToBuild Include="$(LibrariesProjectRoot)sfx.proj"
                    Category="libs"
                    Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
                               '$(BuildTargetFramework)' == '' or
                               '$(BuildAllConfigurations)' == 'true'">
      <AdditionalProperties Condition="$(_subset.Contains('+libs.ref+'))">%(AdditionalProperties);RefOnly=true</AdditionalProperties>
    </ProjectToBuild>
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+libs.ref+')) or $(_subset.Contains('+libs.src+')) or $(_subset.Contains('+libs.oob+'))">
    <ProjectToBuild Include="$(LibrariesProjectRoot)oob.proj" Category="libs">
      <AdditionalProperties Condition="$(_subset.Contains('+libs.ref+'))">%(AdditionalProperties);RefOnly=true</AdditionalProperties>
    </ProjectToBuild>
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.wasmruntime+'))">
    <ProjectToBuild Include="$(LibrariesProjectRoot)\System.Runtime.InteropServices.JavaScript\src\System.Runtime.InteropServices.JavaScript.csproj" Category="mono" />
    <ProjectToBuild Include="$(BrowserProjectRoot)browser.proj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+mono.wasiruntime+'))">
    <ProjectToBuild Include="$(WasiProjectRoot)wasi.proj" Category="mono" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+libs.pretest+'))">
    <ProjectToBuild Include="$(LibrariesProjectRoot)pretest.proj" Category="libs"  />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+libs.tests+'))">
    <ProjectToBuild Include="$(LibrariesProjectRoot)tests.proj" Category="libs" Test="true" />
  </ItemGroup>

  <!-- Host.pretest subset (consumes live built libraries assets so needs to come after libraries) -->
  <ItemGroup Condition="$(_subset.Contains('+host.pretest+'))">
    <ProjectToBuild Include="$(InstallerProjectRoot)tests\Assets\Projects\**\*.csproj" Category="host" />
  </ItemGroup>

  <!-- Host.tests subset (consumes live built libraries assets so needs to come after libraries) -->
  <ItemGroup Condition="$(_subset.Contains('+host.tests+'))">
    <TestProjectToBuild Include="$(InstallerProjectRoot)tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
    <TestProjectToBuild Include="$(InstallerProjectRoot)tests\HostActivation.Tests\HostActivation.Tests.csproj" />
    <TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Tests.csproj" />
    <ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="true" Test="true" Category="host" />
  </ItemGroup>

  <!-- Packs sets -->

  <Choose>
    <When Condition="$(_subset.Contains('+packs.product+'))">
      <ItemGroup Condition="'$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
        <SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" />
      </ItemGroup>
      <ItemGroup Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Host.sfxproj" />
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-host.proj" />
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
        <SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\archives\dotnet-nethost.proj" />
        <SharedFrameworkProjectToBuild Condition="'$(MonoCrossAOTTargetOS)' != ''" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\monocrossaot.sfxproj" Pack="true" />
      </ItemGroup>
      <ItemGroup>
        <ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and '$(RuntimeFlavor)' != 'Mono' and '$(BuildOnlyPgoInstrumentedAssets)' != 'true'" Include="$(InstallerProjectRoot)\pkg\projects\nativeaot-packages.proj" Category="packs" />
      </ItemGroup>
      <ItemGroup>
        <SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.sfxproj" />
        <SharedFrameworkProjectToBuild Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
        <ProjectToBuild Include="@(SharedFrameworkProjectToBuild)" Category="packs" />
      </ItemGroup>
    </When>
  </Choose>

  <ItemGroup Condition="$(_subset.Contains('+packs.installers+')) AND '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
    <InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\sfx\installers.proj" />
    <ProjectToBuild Include="@(InstallerProjectToBuild)" Category="packs" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+packs.tests+')) AND '$(BuildOnlyPgoInstrumentedAssets)' != 'true'">
    <TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj" />
    <ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="true" Test="true" Category="packs" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+publish+'))">
    <ProjectToBuild Include="$(InstallerProjectRoot)prepare-artifacts.proj" Pack="true" Category="publish" />
  </ItemGroup>

  <!-- Utility -->
  <ItemGroup Condition="$(_subset.Contains('+regeneratedownloadtable+'))">
    <ProjectToBuild Include="$(RepositoryEngineeringDir)regenerate-download-table.proj" Pack="true" />
  </ItemGroup>

  <ItemGroup Condition="$(_subset.Contains('+regeneratethirdpartynotices+'))">
    <ProjectToBuild Include="$(RepositoryEngineeringDir)regenerate-third-party-notices.proj" Pack="false" BuildInParallel="false" />
  </ItemGroup>

  <!-- Tasks-->
  <ItemGroup Condition="$(_subset.Contains('+tasks+'))">
    <ProjectToBuild Include="$(RepoTasksDir)tasks.proj" Pack="false" Category="tasks" />
  </ItemGroup>

  <!-- Set default configurations. -->
  <ItemGroup>
    <ProjectToBuild Update="@(ProjectToBuild)">
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'clr'">%(AdditionalProperties);Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'mono'">%(AdditionalProperties);Configuration=$(MonoConfiguration)</AdditionalProperties>
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'libs'">%(AdditionalProperties);Configuration=$(LibrariesConfiguration)</AdditionalProperties>
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'host'">%(AdditionalProperties);Configuration=$(HostConfiguration)</AdditionalProperties>
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'tasks'">%(AdditionalProperties);Configuration=$(TasksConfiguration)</AdditionalProperties>
      <AdditionalProperties Condition="'%(ProjectToBuild.Category)' == 'tools'">%(AdditionalProperties);Configuration=$(ToolsConfiguration)</AdditionalProperties>

      <!-- Propagate configurations for cross-subset builds -->
      <AdditionalProperties>%(AdditionalProperties);LibrariesConfiguration=$(LibrariesConfiguration)</AdditionalProperties>
      <AdditionalProperties>%(AdditionalProperties);HostConfiguration=$(HostConfiguration)</AdditionalProperties>
      <AdditionalProperties>%(AdditionalProperties);TasksConfiguration=$(TasksConfiguration)</AdditionalProperties>
      <AdditionalProperties>%(AdditionalProperties);ToolsConfiguration=$(ToolsConfiguration)</AdditionalProperties>
    </ProjectToBuild>
  </ItemGroup>

</Project>
